/*
 * @Author: Otway
 * @Date: 2019-01-09 11:16:08
 * @LastEditors: Otway
 * @LastEditTime: 2019-08-30 18:50:09
 * @copyright: h-visions
 */
import React, { PureComponent } from 'react';
import {
    Row,
    Col,
    Form,
    Input,
} from 'antd';
const FormItem = Form.Item;
const formItemLayout = {
    // 抽屉里面Form。二列的布局比例
    labelCol: {
        span: 6
    },
    wrapperCol: {
        span: 18
    }
};
class AddFrom1 extends PureComponent {
    state = {
        types: null,
        playingForm: 0
    }
    // 判断选中显示隐藏
    selects = (value) => {
        console.log('当前类型选中', value);
        this.setState({
            types: this.state.types = value,
        })
    }
    //选择播放形式
    changeForm = value => {
        console.log(value)
        this.setState({
            playingForm: value
        })
    }
    //打开选择播放界面
    openCheckBox = () => {
        // APIService.findReportViewListNoPage().then(res => {
        //     let datas = res.data.data
        //     let newData = []
        //     datas.map(item => {
        //         // item.checked=true
        //         newData.push({ label: item.name, value: item.id, disabled: false })

        //     })
        //     this.setState({
        //         checkData: newData
        //     })
        // })
        // this.setState({
        //     visibleB: true
        // })
    }
    render() {
        const {
            form: { getFieldDecorator },
        } = this.props;
        // console.log('这是', formData.checkStandardOption1);
        return (
            <Form >
                <Row>
                    <Col span={24}>
                        <FormItem {...formItemLayout} label={'播放文字:'}>
                            {getFieldDecorator('content', {
                                rules: [
                                    {
                                        required: true,
                                        message: '播放文字为空'
                                    }
                                ]
                            })(<Input placeholder='输入播放文字' allowClear maxLength={20} />)}
                        </FormItem>
                    </Col>
                </Row>
            </Form>
        );
    }
}

export default Form.create()(AddFrom1);
